package com.autumn.cloud.demo.consumer.controllers;

import com.autumn.cloud.demo.consumer.services.OrderAppService;
import com.autumn.cloud.demo.dubbo.api.bo.OrderInfoBO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-12-16 01:04
 **/
@RestController
@Slf4j
public class OrderController {

    private final OrderAppService service;

    public OrderController(OrderAppService service) {
        this.service = service;
    }

    /**
     * 订单列表
     *
     * @return
     */
    @GetMapping(path = "order/list")
    public List<OrderInfoBO> orders() {
        return this.service.orders();
    }

}
